package rest.home.entity;

import java.util.Date;

/**
 * @Author: ZZX
 * @Description:
 * @Date:Created in 19:45 2022/5/5
 * @Modified By:
 */
public class Trouble {
    private Integer troubleId;//事故编号
    private Date troubleDate;//事故时间
    private String troubleMessage;//详细信息
    private Integer troubleStatus;//事故状态

    @Override
    public String toString() {
        String status=null;
        switch (this.troubleStatus){
            case 0:
                status="已解决";
                break;
            case 1:
                status="未解决";
                break;
        }
        return  "事故编号:" + troubleId +
                ", 详细信息:" + troubleDate +
                ", 详细信息:" + troubleMessage +
                ", 事故状态:" + status+";";
    }

    public Trouble() {
    }

    public Trouble(Date troubleDate, String troubleMessage, Integer troubleStatus) {
        this.troubleDate = troubleDate;
        this.troubleMessage = troubleMessage;
        this.troubleStatus = troubleStatus;
    }

    public Trouble(Integer troubleId, Date troubleDate, String troubleMessage, Integer troubleStatus) {
        this.troubleId = troubleId;
        this.troubleDate = troubleDate;
        this.troubleMessage = troubleMessage;
        this.troubleStatus = troubleStatus;
    }

    public Integer getTroubleId() {
        return troubleId;
    }

    public void setTroubleId(Integer troubleId) {
        this.troubleId = troubleId;
    }

    public Date getTroubleDate() {
        return troubleDate;
    }

    public void setTroubleDate(Date troubleDate) {
        this.troubleDate = troubleDate;
    }

    public String getTroubleMessage() {
        return troubleMessage;
    }

    public void setTroubleMessage(String troubleMessage) {
        this.troubleMessage = troubleMessage;
    }

    public Integer getTroubleStatus() {
        return troubleStatus;
    }

    public void setTroubleStatus(Integer troubleStatus) {
        this.troubleStatus = troubleStatus;
    }
}
